//
//  TextCell.m
//  BuffetNews
//
//  Created by 大大大鸿哥 on 14/10/28.
//  Copyright (c) 2014年 lanou3g.com 蓝鸥科技. All rights reserved.
//

#import "TextCell.h"

@implementation TextCell
- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        self.titleLabel = [[UILabel alloc]init];
        self.auther_name = [[UILabel alloc]init];
        self.hotView = [[UIImageView alloc]init];
        self.timeLabel = [[UILabel alloc]init];

        [self.contentView addSubview:self.titleLabel];
        [self.contentView addSubview:self.auther_name];
        [self.contentView addSubview:self.hotView];
        [self.contentView addSubview:self.timeLabel];
        
        [_timeLabel release];
        [_titleLabel release];
        [_auther_name release];
        [_hotView release];
    }
    return self;
}
- (void)dealloc
{
    [_timeLabel release];
    [_titleLabel release];
    [_auther_name release];
    [_hotView release];
    [super dealloc];
}


- (void)layoutSubviews
{
    [super layoutSubviews];
    self.titleLabel.frame = CGRectMake(10, 5, self.contentView.frame.size.width - 15, self.contentView.frame.size.height - 10 / 2);
    
    self.auther_name.frame =CGRectMake(10, self.contentView.frame.size.height - 15, 0, 0);
    [self.auther_name sizeToFit];
    
    self.hotView.frame = CGRectMake(self.auther_name.frame.size.width + 20, self.contentView.frame.size.height - 15 , 23, 13);
    self.timeLabel.frame = CGRectMake(self.auther_name.frame.size.width + 20, self.contentView.frame.size.height - 15 , 80, 13);


}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
